package com.agrm.api.client;

import com.agrm.model.common.dtos.ResponseResult;
import com.agrm.model.member.pojo.Member;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient("member-service")
public interface MemberClient {


    /**
     * 根据id查询会员信息
     * @param id 会员id
     * @return 会员信息
     */
    @GetMapping("/api/v1/member/get")
    ResponseResult<Member> getById(@RequestParam("id") Integer id);


    /**
     * 修改会员信息
     * @param member
     * @return
     */
    @PutMapping("/api/v1/member/update")
    ResponseResult update(@RequestBody Member member);




}
